<template>
    <view class="container">
        <view class="title">系统用户登录</view>
        <form @submit="loginSystemUser">
            <input type="text" name="username" placeholder="请输入用户名" />
            <input type="text" name="password" :password="true" placeholder="请输入密码" />

            <button type="primary" form-type="submit">登录</button>
        </form>
    </view>
</template>

<script>
// pages/user/bind/index.js
const app = getApp();
const JBolt = app.globalData.getJBolt();
export default {
    data() {
        return {};
    }
    /**
     * 生命周期函数--监听页面加载
     */,
    onLoad: function (options) {
        JBolt.WxLoginUtil.login(true);
    },
    /**
     * 生命周期函数--监听页面初次渲染完成
     */
    onReady: function () {},
    methods: {
        loginSystemUser: function (e) {
            JBolt.loginSystemUser(e.detail.value).then(() => {
                JBolt.MsgBox.alert('登录成功');
                JBolt.log('登录成功');
            });
        }
    }
};
</script>
<style>
@import './index.css';
</style>
